import React, { Component } from 'react';
import bus from './bus';
export default class Son2 extends Component {
    state = {
        a: 123
    }
    componentDidMount () {
        bus.on('my-event', (val) => {
            this.setState({
                a: val
            });
        });
    }

    render () {
        return (
            <div>
                {this.state.a}
            </div>
        );
    }
}
